<?php
@session_start();
$PurviewLevel=3;
$CheckChannelID=1 ;  
$PurviewLevel_Others="";

require("../../inc/common.inc.php");
require_once("../Admin_ChkPurview.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<TITLE>铭讯EOS网站后台管理</TITLE>
<Meta name="Keywords" Content="济南网站建设 济南网站制作 山东网站建设 济南铭讯软件有限公司">
<Meta name="Description" Content="济南网站制作：铭讯软件专业服务优秀企业，致力于网站建、设网站推广、网络营销一体的全访位网络服务商">
<link rel="stylesheet" href="../images/style.css" type="text/css">
</head>
<body> 
<?php
require("../mx_head.php");
?>
<div class="right">
<?php 
if ($jobs=="move"){
    //设置推荐
    global $fid;

    $fid=intval($fid);
	if(!$listdb&&!$aid){
		$fun->popmassage("请选择一篇文章","","popback");
		exit();
	}
	elseif(is_array($listdb))
	{
		foreach($listdb AS $key=>$value){
			dowork($key,$jobs,$fid);
		}
	}elseif($aid){
		dowork($aid,$jobs,$fid);
	}
	$url=$fromurl?$fromurl:$FROMURL;
	jump2("操作成功","yx_vpp_article.php?bc=$bc&type=$type&sort=$sort&page=$page",1);
	exit();

}
function dowork($id,$job,$fid){
	global $fun;
	global $db,$pre,$timestamp,$userdb,$webdb,$fiddbadmin,$fiddbadmin2,$Purview;

	if (strpos("#**#$fiddbadmin2","|||$fid|||")<=0 and $Purview!=1){
			$fun->popmassage("您没有对所选分类的管理权限","yx_vpp_article.php?bc=$bc&type=$type&sort=$sort&page=$page","popgotourl");
			exit();
	}
	$rs=$db->getinfo("SELECT name FROM mx_vpp_articleclass WHERE fid='$fid'");
	$db->excu("UPDATE mx_vpp_article SET fid='$fid',fname='$rs[name]' WHERE aid='$id' $usersql");
}
require("yx_vpp_menu1.php");
$usersql=" $articlefidsql ";

?>
<div class="xm2">
<h1 class="fl">信息移动</h1>
</div>
<div class="xm2_b">
<div class="height10"></div>
<form name="form1" method="post" action="yx_vpp_article_move.php">
<table width="100%" border="0" cellspacing="1" cellpadding="5" class="table_southidc">
    <tr align="center"> 
      <th width="3%">ID</th>
      <th>标 题 </th>
    </tr>
<?php
if(!$listdb){
	$fun->popmassage("请选择一篇文章","","popback");
	exit();
}
$sort_fid=$Guidedb->Select(" mx_vpp_articleclass","fid","","prview","",$array_artclass[$bc]);

foreach($listdb AS $aid=>$title){
    $rs=$db->get_one("select aid,title from mx_vpp_article where aid='$aid' $usersql");
    if (!($rs=="") || !(empty($rs))){
?>
    <tr class="list"> 
      <td width="3%" align="center"><?php echo $rs[aid];?></td>
      <td> 
        <input type="checkbox" name="listdb[<?php echo $rs[aid];?>]" value="<?php echo $rs[aid];?>" checked class="input_check">
        <a href="" target=_'blank'><?php echo $rs[title];?></a></td>
    </tr>
<?php
	}
}
?>
	<input type="hidden" name="jobs" value="">
	<input type="hidden" name="type" value="<?php echo $type?>">
	<input type="hidden" name="sort" value="<?php echo $sort?>">
	<input type="hidden" name="bc" value="<?php echo $bc?>">
	<input type="hidden" name="page" value="<?php echo $page?>">
	</table>
	  <table cellpadding="0" cellspacing="5" border="0" align="center"><tr><td><a href="#" onClick="CheckAll(document.form1,'all')">全选</a>/<a href="#" onClick="CheckAll(document.form1,'')">反选</a></td><td>移到所属栏目：</td><td><?php echo $sort_fid?></td><td><input type="button" name="s" class="button2" value="移动" onClick="postdo('move')">
	  </td></tr></table>
	</form>
<script language="javascript">
function postdo(va){
	document.form1.jobs.value=va
	document.form1.submit();
}
</script>
<div class="clear"></div>
<div class="height10"></div>
</div>
</div>
<?php require("../mx_foot.php");?>
</body>
</html>
